# ========================= eCAL LICENSE =================================
#
# Copyright (C) 2016 - 2019 Continental Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#      http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ========================= eCAL LICENSE =================================

@PACKAGE_INIT@

# Set some build relevant variables to build samples appropriately
set(eCAL_install_samples_dir "@eCAL_install_samples_dir@")

set(eCAL_VERSION_MAJOR  @eCAL_VERSION_MAJOR@)
set(eCAL_VERSION_MINOR  @eCAL_VERSION_MINOR@)
set(eCAL_VERSION_PATCH  @eCAL_VERSION_PATCH@)
set(eCAL_VERSION_STRING @eCAL_VERSION_STRING@)

# eCAL is provided only with Release and Debug Version, thus map the other configs to Release build.
set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL Release "")
set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release "")

find_package(Protobuf REQUIRED)

include("@PACKAGE_eCAL_install_cmake_dir@/helper_functions/ecal_add_functions.cmake")
include("@PACKAGE_eCAL_install_cmake_dir@/helper_functions/ecal_helper_functions.cmake")
include("@PACKAGE_eCAL_install_cmake_dir@/helper_functions/ecal_install_functions.cmake")
include("@PACKAGE_eCAL_install_cmake_dir@/eCALTargets.cmake")

# careful, this is a Windows hack to find protobuf etc. with the eCAL installation
# To be removed if there is a better solution like Conan e.g.
#if(WIN32)
#  list(APPEND CMAKE_MODULE_PATH "${PACKAGE_PREFIX_DIR}/../../../../cmake")
#  list(APPEND CMAKE_PREFIX_PATH "${PACKAGE_PREFIX_DIR}/../../../../cmake")
#endif()

find_package(CMakeFunctions REQUIRED)

find_package(Threads REQUIRED)
